<?php $this->widget('application.components.AdminMenu',array('nameId'=>'news')); ?>
<!-- Subheader -->
<div id="subheader" class="clearfix">
	<h2>Нововсти</h2>
	<a href="#"><span>Cancel</span></a>
</div>
<!-- /End Subheader -->

<!-- Main Content Area -->
<div style="height: max-height;" id="content">

	<div id="inner">
	<?php
	$form=$this->beginWidget('CActiveForm',array(
	        'id'=>'news',
	        'enableAjaxValidation'=>true,
	'htmlOptions'=>array('enctype'=>'multipart/form-data')		
	)	
	);
	?>
	    <ul>
			<li>
				<!-- Large Text Input -->
			<!--  	<label for="large input">Заголовок</label>-->
				
				
				<?php echo $form->labelEx($New,'title',array("label"=>'Заголовок','for'=>'large input')); ?>
				<?php echo $form->textField($New,'title',array('value'=>$news->title,'class'=>'large')); ?> 			
				<?php echo $form->error($news,'title'); ?>
			</li>

			<li>
				<!-- Full Textarea -->
			<script type="text/javascript">
				$(document).ready(
					function()
					{
						$('#editor').editor({ focus: true });
					}
				);
			</script>
								
				
				<?php echo $form->labelEx($New,'text',array('label'=>"Содержание новости:",'for'=>'news')); ?>
				<?php  echo CHtml::textArea('News[text]',$news->text,$htmlOptions=array('rows'=>'10','cols'=>"70%" ,'id'=>'editor')); ?>
				<?php echo $form->error($New,'text'); ?>
			</li>

			<!-- Begin List -->
			<div class="grid_6">

			<li>
				<!-- Categosry = TAGY -->
			
				
				<?php echo $form->labelEx($New,'id_tag',array('label'=>"Категория:",'for'=>'category')); ?>
				<?php echo CHtml::dropDownList('taglist', $news->id_tag ,
                              $list, array('class'=>'newListSelected')
                              ); ?>
				<?php echo $form->error($New,'name_tag'); ?>
				
				<!-- <div tabindex="0" class="newListSelected ">
					<div class="selectedTxt">Option one</div>
					<ul class="newList" style="">
						<li class="newListOptionTitle">Group 1
							<ul>
								<li><a class="hiLite" href="javascript:void(0);">Option one</a></li>
								<li><a href="javascript:void(0);">Option two</a></li>
								<li><a href="javascript:void(0);">Option three</a></li>
							</ul>
						</li>
						<li class="newListOptionTitle">Group 2
							<ul>
								<li><a href="javascript:void(0);">Option one</a></li>
								<li><a href="javascript:void(0);">Option two</a></li>
								<li><a href="javascript:void(0);">Option three</a></li>
							</ul>
						</li>
						<li class="newListOptionTitle">Group 3
							<ul>
								<li><a href="javascript:void(0);">Option one</a></li>
								<li><a href="javascript:void(0);">Option two</a></li>
								<li><a href="javascript:void(0);">Option three</a></li>
							</ul>
						</li>
					</ul>
				</div>End LIST -->
			</li>
	
			
			<li>	
				<?php echo Chtml::activelabelEx($New,'image',$htmlOptions=array('label'=>"Содержание новости:",'for'=>'news')); ?>	
				<?php echo Chtml::activeFileField($news,'image'); ?>
				<?php echo Chtml::error($news,'image'); ?>
			
			</li>
			 
			
			

			</div>

			<!-- Buttons -->
			<div class="grid_6">
				<label for="button news">Опубликовать новость:</label>
                                <?php echo '<input type="hidden" name="id" value="'.$_GET['id'].'" />'?>
			    <input type="submit" name="news" value="Опубликовать" class="button_white" />
			</div>
			<!-- end btn -->

		</ul>
	<?php $this->endWidget(); ?>

	</div>
</div>
<!-- End Content Area -->
